package springboot.houbank.com.scheduled;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by zhaoqiguo on 2016/9/8.
 */
@Component
public class ScheduledTask {
    private Logger logger = LoggerFactory.getLogger(ScheduledTask.class);

    @Scheduled(cron="0 0 1 * * ?")
    public void statusCheck(){
        logger.info("schedule running");
        System.out.println("running ... ");
    }

    @Scheduled(fixedRate = 60000)
    public void scheduledTest(){
        logger.info("seconde running");
        System.out.println("seconde running");
    }

}
